<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"/>
    <script src="/pay.js"/>
</head>
<body>
<table>
    <thead>
    <tr>
        <th>订单编号</th>
        <th>订单名称</th>
        <th>总价</th>
        <th>状态</th>
        <th>创建时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="order : ${orderList}">
        <td th:text="${order.orderId}"></td>
        <td th:text="${order.orderName}"></td>
        <td th:text="${#numbers.formatDecimal(order.totalPrice,1,2)}"></td>
        <td th:text="${#dates.format(order.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
        <td th:switch="${order.status}">
            <td th:case="10">待支付 <a href="#" th:onclick="'javascript:pay(\''+${order.orderId}+'\',1)'">去支付</a></td>
            <td th:case="20">已支付</td>
        </td>
        <td>
            <a href="#">查看订单</a>
        </td>
    </tr>
    </tbody>
</table>
<div id="qrimg"></div>
</body>
</html>


